<script setup lang="ts">
import { User } from '$/client'
import { Users } from '@/scripts/client-admin'
import { useRequest } from 'alova/client'

const props = defineProps<{ id: number }>()

const { data } = useRequest(() => Users.retrieve(props.id), {
  initialData: User.inst()
})
</script>

<template>
  <div>
    <div>编号: {{ data.id }}</div>
    <div>名称: {{ data.name }}</div>
    <div>总充值: {{ data.amount }}</div>
    <div>余额: {{ data.balance }}</div>
  </div>
</template>
